With the advent of the information era, the data stored in a computer system increases day by day. The hard disk drives used for storing data accordingly continue to expand in storage capacity, and have progressed from single disk to multiple disks. Nevertheless, the price of hard disk drives is proportional to its storage capacity. That is, the more the storage capacity is, the more expensive it costs with less fault-tolerating. Therefore, a virtual large-scale disk drive comprising of a plurality of independent disk drives such as a redundant array of independent disks (RAID), called a disk array, is developed for the purpose. By using the disk array, the performance of data storage is enhanced, and the disk arrays are provided with debugging capabilities. When a disk drive is damaged, it is only necessary to replace the drive with one that functions normally, and then the data stored in the damaged disk drive can be recovered later.
A fault-tolerating disk array is able to perform the operations to produce check data while storing data to disk drives, and then stores the produced check data to the disk drives. When a disk drive is damaged, by performing operations on the data stored in other disk drives and on the check data, the original data in the damaged disk drive can be recovered, and can thus be stored back to the newly replaced disk drive. Most of the fault-tolerating disk array technologies nowadays use a central processing unit to perform operations on data to produce check data. In this way, the performance of the central processing unit and the computer system will be affected. In addition, because the data has to be read from memories or disk drives when the central processing unit produces check data or recovery data, and then the check data or the recovery data have to be stored back to the disk drives, which will consume lots of time.
Due to the problems described above, nowadays a separate input/output processor for disk arrays is developed to perform the operations for producing the check data as well as the recovery data. However, the separate input/output processor is expensive, and memory support is necessary when the processor is employed. Therefore, the effects for employing the independent processor are limited for those applications whose hardware cost has to be reduced.
By summarizing foregoing problems, the present invention proposes a circuit and a method for checking and recovering a disk array that will not affect the performance of the central processing unit while producing check data or recovery data, and the circuit is so simple that the hardware cost is effectively reduced to solve the foregoing problems.